package org.sfac.common.vo;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * Image Type
 */
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ImageType {
    PROFILE_BIG("profileBig", 1024, 1000, 1000),
    PROFILE_MIDDLE("profileMiddle", 500, 300, 300),
    PROFILR_SMALL("profileSmall", 100, 20, 20)
    ;
    public String name;
    public int size;
    public int width;
    public int height;

    ImageType(String name, int size, int width, int height) {
        this.name = name;
        this.size = size;
        this.width = width;
        this.height = height;
    }

    public static org.sfac.common.vo.ImageType getImageTypeByName(String name) {
        org.sfac.common.vo.ImageType[] imageTypes = org.sfac.common.vo.ImageType.values();
        for (org.sfac.common.vo.ImageType item : imageTypes) {
            if (name.equals(item.name)) {
                return item;
            }
        }
        return org.sfac.common.vo.ImageType.PROFILR_SMALL;
    }
}
